package com.example.administrator.dagger2demo.ui;

import android.os.Bundle;
import android.util.Log;

import com.example.administrator.dagger2demo.R;
import com.example.administrator.dagger2demo.adapter.TestAdapter;
import com.meetic.shuffle.Shuffle;
import com.meetic.shuffle.ShuffleViewAnimatorOnSecondCard;

public class MainActivity extends BaseActivity {


    //    @Inject
//    Retrofit _retrofit;
//    @Inject
//    RestApi _rRestApi;
    Shuffle shuffle;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        shuffle = (Shuffle)  findViewById(R.id.shuffle);
        Log.i("Evd", shuffle == null ? "11" : "00");
        shuffle.setShuffleAdapter(new TestAdapter());
        shuffle.setViewAnimator(new ShuffleViewAnimatorOnSecondCard());
    }

//    @Override
//    public void setUpActivityComponent(AppComponent appComponent) {
//
//        Observable<ArrayList<ReleaseInfo>> observable =  _rRestApi.requestIndex();
//        observable.subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//                .subscribe(new Observer<ArrayList<ReleaseInfo>>() {
//                    @Override
//                    public void onCompleted() {
//                        Log.i("TAG","onCompleted");
//                    }
//
//                    @Override
//                    public void onError(Throwable e) {
//                        Log.i("TAG","Throwable="+e.toString());
//                        ApiException exception = ApiException.create(e, _retrofit);
//
//                        Log.i("TAG","exception="+exception.getMessage());
//                    }
//
//                    @Override
//                    public void onNext(ArrayList<ReleaseInfo> userInfos) {
//                        Log.i("TAG","size="+userInfos.size());
//
//                    }
//                });

//    }
}
